package dlg.code.state;

import dlg.code.state.domain.OrderInfo;
import dlg.code.state.enums.OrderStateEnum;
import dlg.code.state.service.IOrderService;
import dlg.code.state.service.impl.OrderServiceImpl;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class Client {
    private final static Logger log = LoggerFactory.getLogger(Client.class);

    public static void main(String[] args) {
        OrderInfo orderInfo = new OrderInfo(1L, OrderStateEnum.UNPAID);
        IOrderService orderService = new OrderServiceImpl();
//        orderService.reminder(orderInfo);
        orderService.pay(orderInfo);
        orderService.reminder(orderInfo);

        orderInfo.setOrderStateEnum(OrderStateEnum.DELIVERED);
        orderService.reminder(orderInfo);
    }
}
